package org.student.service;

import java.io.Serializable;
import java.util.List;

import javax.annotation.Resource;

import org.hibernate.LockMode;
import org.springframework.stereotype.Component;
import org.student.dao.ITeacherInfoDao;
import org.student.entity.StuSys_Teacher;

/**
 * 项目名称:学生管理系统
 * 类名称：ITeacherInfoService
 * 类描述：教师业务类
 * 创建人:郭坚生
 * 描述:
 * 创建时间:2011-9-23 下午04:08:50
 */
@Component("ITeacherInfoService")
public class ITeacherInfoService implements ITeacherInfoDao {

	private ITeacherInfoDao  itea;
	public ITeacherInfoDao getItea() {
		return itea;
	}
	@Resource(name="ITeacherInfoDaoImpl")
	public void setItea(ITeacherInfoDao itea) {
		this.itea = itea;
	}

	/**
	 * 插入教师信息
	 * @throws Exception 
	 */
	@Override
	public boolean insert(StuSys_Teacher tea)  throws Exception{
		return this.itea.insert(tea);
	}
	/**
	 * 查询所有教师信息
	 */
	
	@Override
	public List<StuSys_Teacher> getAllTeacher() throws Exception {
		return this.itea.getAllTeacher();
	}
	/** 
	 * 通过班级名称查找教师
	 */
	@Override
	public List<StuSys_Teacher> getTeachersByClass(String className)
			throws Exception {
		return this.itea.getTeachersByClass(className);
	}
	/** 
	 * 通过教师ID查找教师
	 */
	@Override
	public List<StuSys_Teacher> getTeachersById(String id) throws Exception {
		return this.itea.getTeachersById(id);
	}
	/** 
	 * 
	 */
	@Override
	public List<StuSys_Teacher> getTeachersByInsititue(String insititueName)
			throws Exception {
		return this.itea.getTeachersByInsititue(insititueName);
	}
	/** 
	 * 通过教师姓名查找教师
	 */
	@Override
	public List<StuSys_Teacher> getTeachersByName(String name) throws Exception {
		return this.itea.getTeachersByName(name);
	}
	/** 
	 * 全文搜索
	 */
	@Override
	public List<StuSys_Teacher> getTeachersByWords(String words)
			throws Exception {
		return this.itea.getTeachersByWords(words);
	}
	/** 
	 * 根据ID删除教师信息
	 */
	@Override
	public void deleteTeacher(int id) throws Exception {
		
		this.itea.deleteTeacher(id);
	}
	/** 
	 *修改教师信息
	 */
	@Override
	public void updateTeacher(StuSys_Teacher tea) throws Exception {
		this.itea.updateTeacher(tea);
	}


}
